<%@ page import="java.sql.Date" %>
<%@ page import="java.text.DateFormat" %>
<%@ page import="java.util.Locale" %>
<%--

  @author Tharanga Punchihewa
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<script src="${pageContext.request.contextPath}/js/print.js" type="text/javascript"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/printDetailForm.css" media="print"/>

<script type="text/javascript">
    $(document).ready(function() {
        var dO = new Date();
        var d = dO.getDate();
        var m = dO.getMonth();
        var y = dO.getFullYear();
        var today = d + "/" + m + "/" + y;
        /*$('#dueDateId').DatePicker({
         format:'m/d/Y',
         date:dO,
         current: dO,
         starts: 1,
         position: 'right',
         onBeforeShow: function() {
         $('#dueDateId').DatePickerSetDate(dO, true);
         },
         onChange: function(formated, dates) {
         $('#dueDateId').val(formated);
         }
         });*/
        $('#date').text(today)
        $("#save-dueDate-from").validate({
            rules:{
                dueDateId:{
                    required:true
                }
            },
            messages:{
                dueDateId:{
                    required:"Please enter the due date"
                }
            }
        });
    });
</script>

<div id="org-info-module-home-title" class="module-home-title">
    <s:a href="landInterests.do"><img src="${pageContext.request.contextPath}/images/company-profile.png"
                                             alt="Organizational Information"><span>Organizational Information</span></s:a>
</div>
<s:if test="hasActionErrors() || hasActionMessages()">
    <div id="message-box" class="message-box">
        <div class="action-msg"><s:actionmessage/></div>
        <div class="action-err"><s:actionerror/></div>
    </div>
</s:if>
<div id="set-due-date" class="form-outer">
    <s:form action="saveDueDate.do" method="POST" id="save-dueDate-from">
        <table class="width-100">
            <tr>
                <td><s:label value="%{getText('due_date.label')}" cssClass="mandatory-field"/><s:label
                        value="%{getText('date_format.label')}" cssClass="date-format"/></td>
                <td colspan="2">
                    <s:textfield name="organization.dueDate" id="dueDateId" onclick="selectDate('dueDateId')"
                                 cssClass="datePicker"/>
                    <s:submit value="%{getText('save.label')}"/>
                </td>
                <s:hidden name="organization.id"/>
            </tr>

        </table>
    </s:form>
    <hr>
</div>

<s:if test="organization.status.ordinal() == 0 ">

    <div id="add-organization-from-outer" class="form-outer">

        <s:label value="Land Ministry," cssClass="float-left"/><br>
        <s:label value="Colombo" cssClass="float-left"/><br>
        <s:label id="date" cssClass="float-left"/><br>
        <br>

        <s:label name="contactOfHeadOfGO.address" cssClass="float-left"/><br>

        <s:label value="Dear " cssClass="float-left"/>&nbsp;&nbsp;<s:label name="headOfGO.name"
                                                                           cssClass="float-left"/><s:label value=","
                                                                                                           cssClass="float-left"/><br>

        <p style="text-align:justify;"> We are collecting information from Government Organizations which are authorized
            to
            declare an interest in relation
            to Government Lands in order to maintain those information in the system</p><br>

        <p style="text-align:justify;">Please fill the 'Application of Registration to Update Interests' which has been
            attached here with and send back to us on or before <s:label name="organization.dueDate"/></p>  <br>


        <s:label value="Regards," cssClass="float-left"/><br><br>
        <s:label value="-----------------------------" cssClass="float-left"/> <br>
        <s:label value="(Signature)" cssClass="float-left"/> <br>
        <s:label name="user.fullName" cssClass="float-left"/> <br>
        <s:label value="ORMOI" cssClass="float-left"/> <br>
        <hr>
    </div>

    <div id="ormoi-detail" class="form-outer">
        <h3><s:label value="%{getText('app_reg_update_inters.label')}"/></h3>

        <table>

            <tr>
                <td class="left-align"><s:label value="%{getText('type_of_interest.label')}"/></td>
                <td colspan="2" class="left-align">
                    <s:label value="_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "/>

                </td>
            </tr>

            <tr>
                <td class="left-align"><s:label value="%{getText('user_name.label')}"/></td>
                <td colspan="2" class="left-align">
                    <s:label value="_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _"/>

                </td>
            </tr>
            <tr>
                <td class="left-align"><s:label value="%{getText('full_name.label')}"/></td>
                <td colspan="2" class="left-align">
                    <s:label value="_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
                              _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
                               _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _"/>
                </td>
            </tr>
            <tr>
                <td class="left-align"><s:label value="%{getText('address.label')}"/></td>
                <td colspan="2" class="left-align">
                    <s:label value="_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
                                _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
                                _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _"/>
                </td>
            </tr>
            <tr>
                <td rowspan="2"><s:label value="%{getText('telephone.label')}"/></td>
                <td><s:label value="%{getText('mobile.label')}"/></td>
                <td><s:label value="_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "/></td>
            </tr>
            <tr>
                <td><s:label value="%{getText('land_phone.label')}"/></td>
                <td><s:label value="_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "/></td>
            </tr>
            <tr>
                <td class="left-align"><s:label value="%{getText('email.label')}"/></td>
                <td colspan="2" class="left-align"><s:label
                        value="_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "/></td>
            </tr>
            <tr>
                <s:hidden name="organizationId"/>
                <s:hidden name="userRoleId"/>
                <s:hidden name="editMode"/>

            </tr>
        </table>

    </div>

</s:if>
<div id="printbtn" class="form-button-div right-align">
    <%--<input type="button" value="Print" id="print"  class="print-btn">--%>
    <input type="button" value="Print" onclick="printLetterPage();">

</div>




